package com.jtbd.controller;

import com.jtbd.dto.http.UserStudentHttpDto;
import com.jtbd.dto.result.ResponseBaseData;
import com.jtbd.service.StudentBaseOperateService;
import com.jtbd.service.UserInfoService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/register")
@Tag(name = "用户接口")
public class UserRegisterController {
    @Resource
    private UserInfoService userInfoService;
    @Resource
    private StudentBaseOperateService operateService;

    @PostMapping("/userRegister")
    @Operation(summary = "用户注册")
    public ResponseBaseData<String> userRegister() {
        return ResponseBaseData.success("用户注册成功");
    }

    @PostMapping("/stuRegister")
    @Operation(summary = "学生用户注册")
    public ResponseBaseData<String> studentRegister(@RequestBody UserStudentHttpDto studentInfo) {
        operateService.studentRegister(studentInfo);
        return ResponseBaseData.success("学生注册成功");
    }
}
